#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(){
	
	int number = 0;
	int guess = 0;
	int count = 0;
	
	srand(time(0));
	number = rand() % 100 + 1;

	do{
		printf("\nMake your guess:");
		scanf("%d", &guess);
		if(guess > number){
			printf("Your number is too large!");
		}else if(guess < number){
			printf("Your number is too small!");
		}
		count++;
	}while(guess != number);
	
	printf("Great!Your only use %d times to guess the number", count);
	
	return 0;
}
